// Pagination 分页

// Base
.e-pagination {
    display: flex;
    align-items: center; 
    flex-wrap: wrap;
    justify-content: space-between;  
    margin: 0;
    padding: 0;   
    
    .e-pagination-links, .e-pagination-links li a {
        display: flex;   
        justify-content: center;
        align-items: center;
    }
    
    .e-pagination-links {
        list-style-type: none;
        margin: 0;
        padding: 0;          

        li {
            display: flex;
            justify-content: center;
            align-items: center;             
            margin-right: .5rem;
            

            @include e-rounded {
                border-radius: $e-border-radius;
            }

            a {
                font-weight: 600;
                color: e-base-color(label, 2);
                font-size: 1.1rem;
                padding: 0 .2rem;
                display: flex;
                flex-wrap: wrap;
                justify-content: center;
                align-items: center;                
                min-width: 30px;
                min-height: 30px;    
                margin: 0;            
            }
        }

        .e-pagination-link--active {
            a {
                color: e-brand-color(inverse);
            }
        }       
    }

    // Toolbar
    .e-pagination-toolbar {
        margin: 0;
        display: flex;
        align-items: center;
        padding: 0;   

        .form-control {              
            padding: 0;   
            margin-right: 10px;              
            height: 30px; 
            font-size: 1.1rem;
            font-weight: 500;           
            line-height: 1;           
            outline: none;
            border: none;        
        }

        .pagination-desc {
            flex-grow: 1;
            font-weight: 500; 
            color: e-base-color(label, 2);
        }
    }

    @each $name, $color in $e-state-colors {
        &.e-pagination--#{$name} {
            
            .e-pagination-links {
                .e-pagination-link--first, .e-pagination-link--next, .e-pagination-link--prev, .e-pagination-link--last {
                    background: rgba(e-get($color, base), .1);
                }

                .active {
                    background: e-get($color, base);
                }

                li {
                    &:hover {
                        background: e-get($color, base);
                        transition: color .3s ease;

                        a {
                            color: e-brand-color(inverse);

                            i {
                                color: #fff !important; 
                            }
                        }
                    }
                }
            }  
            .e-pagination-toolbar {
                .form-control {
                    background: rgba(e-get($color, base), .1);
                }                
            }
        }
    } 
    

    // Circle style links
    &.e-pagination--circle {
        .e-pagination-links {
            li {
                min-width: 30px;
                min-height: 30px;

                @include e-rounded {
                    border-radius: 50%;
                }
            }
        }
    }

    // Sizing options
    &.e-pagination--lg {
        .e-pagination-links {
            li {
                a {                   
                    font-size: 1.3rem;                            
                    min-width: 35px;
                    min-height: 35px;                
                }
                
            }
        }

        .e-pagination-toolbar {
            .form-control {                           
                height: 35px;                           
                font-size: 1.2rem;
                padding: .2rem 0 .2rem .2rem;
            }    
        }
    }

    &.e-pagination--sm {
        .e-pagination-links {
            li {
                a {                   
                    font-size: 1rem;                            
                    min-width: 25px;
                    min-height: 25px;                
                }
                
            }
        }

        .e-pagination-toolbar {
            .form-control {                           
                height: 25px;                           
                font-size: .9rem;
            }    
        }
    }
}


@include e-mobile {
    .e-pagination {
        .e-pagination-links {
            display: flex;
            flex-wrap: wrap;

            li { 
                margin: .3rem .5rem .3rem 0;;
                            
                a {
                    font-size: .9rem;
                    min-width: 25px;
                    min-height: 25px;
                }                
            } 
        }        
       
        .e-pagination-toolbar {
            .form-control {                           
                height: 25px;                             
                font-size: .9rem;
                padding: .2rem 0 .2rem .2rem;
            }
        }
    }
}
 
 